<?php
header("Content-type:text/html;charset=utf-8");
if($_POST){
	require_once('../config.php');
	  $id=$_POST['id'];
	  $picname =mysqli_fetch_assoc($con->query("select url from picture where id= $id"));
	  if(($con->query("delete from picture where id=$id"))&&(unlink('./upload/'.$picname['url']))){
	  	$array=array("1");
	  	echo json_encode($array);
	  }
}



?>